home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
011
/
sd22.arc
/
SD22.DOC
< prev
Wrap
Text File
|
1987-05-21
|
7KB
|
140 lines
Introduction
Switch Directory (SD) is a utility that allows you to easily switch
between subdirectories and drives with a minimum of typing. All you
need to do is type SD and the name of the drive/subdirectory you desire
to go to and SD takes you there. If you have made a mistake, hitting
Ctrl-Brk will break you out of the program and put you back in the
subdirectory you started in. With version 2.1 SD will also except the
full path designation and quickly switch to the specified path without
searching.
Usage
[d:\....]>SD [drive][switch][subdirectory name]
[drive] - the drive to search (if not searhing
current drive)
[switch] = blank - search whole disk
= \ - search only subdirectories of the
current directory (if no other \
in subdirectory name)
= / - search only one path deep. Searches
the root directory only. (Similar
to DOS CD command with one pathname)
[subdirectory name] - the name of an individual
subdirectory or a complete path
If the command line is left blank then you are
taken to the root directory of the disk
? - shows help screen
If the command line is left blank then you are
taken to the root directory of the disk
Examples
SD d: - changes the active drive to d: and puts you
in the root directory
SD /source - searches the root directory of the current drive
for a subdirectory named source and puts you in
in it (if found)
SD \source - searches the current directory for subdirectories
named source and puts you in the first one it finds
NOTE: This is different than the DOS CD command which
would search the root dir with this syntax.
SD \turbo\source - changes the current directory to \turbo\source.
This is the same as the DOS CD command.
SD source - searches the current drive for a subdirectory named
source and puts you in the first one it finds
SD d:source - changes the current drive to d and searches that
drive for a subdirectory named source and puts you
in the first one it finds.
SD d:\source - searches the current directory of the specified
drive for subdirectories named source and puts
you in the first one it finds
SD d:\turbo\source- changes the current drive to the drive specified
then puts you in the specified directory
This is the an enhanced version of the DOS CD
command that lets you specify the drive as well
as the specific path.
Caveats and Other Things
Caveats first. If you have duplicate subdirectory names SD will
drop you in the first one it finds. SD will only search the drive
that is specified. If you have a large number of subdirectories with
a lot of depth SD could take a few seconds to find its way; be patient,
such is the price of progress. Of course, with the source code
included, you could try and improve the search and speed it up. Any
improvements to the code would be welcomed. The source was derived
from Vern Buerg's sorted directory program, LDIR and WHISK by Charles
Wooster. Thanks guys. It is written for the A86 assembler.
This shouldn't be a problem for anyone who is using MASM.
If you have any comments, suggestions or bug reports drop me
a line on Bob Blacher's Computer Connection in DC.
Stephen Falatko
Update Notes
Version 1 - 3/12/87
Version 1.1 - 3/18/87 Bug fix. An error in the routine that creates
a full path name for use in actually setting
path would preclude switching to directories
whose depth was greater than 2 deep.
Version 2.0 - 5/15/87 Changed the path search routine. Added new
features, the / and \ switches to search one path
deep and search only subdirectories of the current
directory respectively. This provides a means to
refine the searching and provide more speed. You
can now search other drives by specifying a drive
on the command line. Added break out feature so
that hitting Ctrl-Brk will place you in your
original directory.
Version 2.1 - 5/19/87 Jack Kilday, sysop of Northern Lights in Maine,
suggested that the capability to designate a
specific path be added to SD. This has been added.
SD recognizes a full path on the command line
(by seeing two or more '\' characters)
and instead of searching the entire disk for the
subdirectory explicitely changes to the desired
path. NOTE: One difference between SD and the
DOS CD command: CD\subdir will check the root
directory for the subdirectory, SD \subdir will
check only subdirectories of the current directory
for the desired subdir. To check only the root
directory you must use SD /subdir.
Version 2.2 - 5/21/87 Bug fix. If you tryed to change directories and
used a capital drive specifier the program changed
it to lower case which DOS doesn't like and the
drive was not changed.